home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / pcxbgi1.exe / lha / PCX2BGI.DOC < prev    next >
Text File  |  1991-03-03  |  11KB  |  224 lines

  1.  
  2.  
  3.                           HOW TO USE PCX2BGI.EXE
  4.                        By Marty Balash, Waterbury CT
  5.                               PCLINK: MarBal
  6.                                  03/03/91
  7.  
  8.                        FOR TURBO C AND TURBO PASCAL
  9.  
  10.           A GRAPHICS UTILITY FOR DISPLAYING .PCX and .LBM FORMAT FILES
  11.               CONVERTS ALL OR PART OF PICTURE TO BGI IMAGE FORMAT
  12.  
  13.    * Directly reads Deluxe Paint and PC Paintbrush pictures and saves them
  14.      as .MJB files (which are BGI images with a 28-byte header attached.)
  15.      A utility is provided to remove the header, if desired.
  16.    * Graphics created with paint programs can be easily displayed
  17.      by Turbo C and Turbo Pascal programs.
  18.    * A program using bitmapped graphics is as easy as opening a graphics
  19.      screen, reading a file, and using PutImage.
  20.    * Great for games, animations or any application.
  21.    * Turbo C programmers can hard-code smaller graphics into their programs
  22.      without needing external graphics files. C-code generation utility and
  23.      sample program provided.
  24.    * Shareware - Only $15.00!
  25.        Send To:
  26.          Marty Balash
  27.          2 Pinecrest Drive
  28.          Prospect CT  06712
  29.  
  30.  ***************************************************************************
  31.  * IMPORTANT - READ THIS:                                                  *
  32.  *   Use this software at your own risk.  I assume no responsibility for   *
  33.  *   any type of losses or difficulties of any kind that you encounter,    *
  34.  *   directly or indirectly, as a result of using these programs. They     *
  35.  *   have been tested only by me on my computer with compilers configured  *
  36.  *   to my preferences.                                                    *
  37.  *   These programs (except for the Pascal) were written for my personal   *
  38.  *   use, and I decided to release them as shareware.                      *
  39.  *   Please send me $15.00 if you find them useful.                        *
  40.  *   -  Deluxe Paint is a registered trademark of Electronic Arts, Inc.    *
  41.  *   -  PC Paintbrush is a registered trademark of Z-Soft, Inc.            *
  42.  *   -  Turbo C, Turbo Pascal and BGI are registered trademarks of Borland *
  43.  *      International, Inc.                                                *
  44.  ***************************************************************************
  45.  
  46. TUTORIAL - Saving Part Of A Picture To Disk
  47.    o - Start the program with the supplied demo picture:
  48.        PCX2BGI MOUTHS.PCX <Enter>
  49.    o - Wait for the picture to load, press any key when message comes up.
  50.    o - Press <Enter> to select "Partial Screen" save.
  51.    o - MOUTHS.PCX will be displayed on the screen with a white "corner-
  52.        shaped" cursor in the upper left area of the screen.
  53.          - Try pressing the "C" key to change the color of the cursor and
  54.            status line (on the bottom of the screen).
  55.          - Press the "X" key to view the help screen.
  56.            Press any key except "C" to return to framing your image.
  57.          - Press the space bar to change the cursor speed and notice
  58.            that "Speed:" on the status line shows the current speed.
  59.        Use the cursor keys to move the cursor to the upper-left region
  60.        of the area you want to save. Press <Enter> after you have selected
  61.        the upper-left corner.
  62.    o - The cursor has changed to a rectangle. Move the lower-right corner of
  63.        the rectangle to the lower-right region of the area you want to save.
  64.        Use the spacebar to change the cursor speed. Press <Enter> when you
  65.        have framed the image you want to save.
  66.   o - When prompted for a filename, type:
  67.           MYTEST1 <Enter>
  68.        This will create a file called MYTEST.MJB.
  69.          Note: You could have left the filename blank if you didn't want to
  70.                save.
  71.          Note: Existing files won't be written over until you verify that you
  72.                want to do so.
  73.    o - When prompted "Select Another Image From Same Screen? (Y/N)", press
  74.        "N" to quit the program. You could continue working with the same
  75.         picture by entering "Y" at this prompt.
  76.    o -  View the image you just saved:
  77.           SHOWMJB MYTEST1.MJB <Enter>
  78.         SHOWMJB.C is in the zipped file for Turbo C programmers. The zipped
  79.         for Turbo Pascal programmers contains two TP demos.
  80.  
  81. TUTORIAL - Saving A Whole Picture To Disk
  82.    o - Start the program with the supplied demo picture:
  83.        PCX2BGI MOUTHS.PCX <Enter>
  84.    o - Wait for the picture to load, press any key when message comes up.
  85.    o - Press the spacebar to move the arrow to "Full Screen".
  86.    o - Press <Enter> to select "Full Screen" save.
  87.    o - MOUTHS.PCX will be displayed on the screen until you press a key.
  88.    o - When prompted for a filename, type:
  89.            MYTEST2 <Enter>
  90.    o - When prompted "Select A Partial Image From This Screen? (Y/N)", press
  91.        "N" to quit the program.
  92.    o -  View the image you just saved:
  93.           SHOWMJB MYTEST2.MJB <Enter>
  94.  
  95. NOTE ON USING PCX2BGI "PARTIAL SCREEN":
  96.     o - When framing a partial image from a screen, the bottom-most part
  97.         of the screen is not available, because of the status line.
  98.         A full-screen save will always save this part of the screen.
  99.         Don't draw any graphics down there if you plan on using a
  100.         partial save to get them.
  101.     o - The 11th color of the picture palette is being used for the cursor
  102.         and status line. The "C" key changes the color, but the not the
  103.         palette position of the cursor and status line (it's always the 11th
  104.         color in the palette). The image being displayed and the image
  105.         being saved use the original 11th color after exiting this
  106.         screen.
  107.     o - Use the coordinates on the status line when working. By making
  108.         a note of where the image was when you picked it up, you can
  109.         place it in exactly the same place from your program - just use
  110.         the (status line) X and Y coordinates in PutImage.
  111.         If you need to save similar images and want them all to be the
  112.         same size, note the coordinates before you press <Enter> the
  113.         second time.
  114.     o - If you make a mistake framing your image:
  115.         Keep pressing <Enter> until you return to picture screen
  116.         again, with the cursor in the upper left corner. The cursor
  117.         will be the same color as last time.
  118.         Pressing <Enter> at the filename prompt will not save the image
  119.         you just framed, and pressing <Enter> at the "Another Image?"
  120.         prompt will assume you mean "Y".
  121.  
  122. NOTE ON LOADING .LBM PICTURES:
  123.          They load slow. It doesn't affect the saved .MJB image.
  124.  
  125. WHAT FILES TO USE:
  126.    o -  Turbo C programmers should unzip the file TC.ZIP first.
  127.    o -  Turbo Pascal programmers should unzip the file TP.ZIP first.
  128.    o -  Programmers should look through both zip files, TC.ZIP and TP.ZIP,
  129.         no matter what language they normally use.
  130.         -  C programmers might want to look at TPDEMO2.PAS for a rough
  131.            demo of animation.
  132.         -  Pascal programmers might want to look at SHOWMJB.C or CYCLE.C
  133.            (at least the comments) to see how to load a full screen image,
  134.            since I haven't included any Pascal code to do that.
  135.  
  136.    Programming Tips:
  137.       *  A quick way to clear an area of the screen is to
  138.          draw a solid rectangle, the same color as the
  139.          background, over the area.
  140.       *  If an object is too big to save in one "Partial
  141.          Save", save it in two adjacent images. When
  142.          it's positioned on the screen, you can't tell that
  143.          the object is made up of two images.
  144.       *  Use the program TPCONV.EXE in the TP.ZIP file to
  145.          create header files containing palettes from
  146.          various pictures. These 28-byte header files can be
  147.          loaded for the purpose of alternating color palettes
  148.          while displaying images.
  149.       *  If you don't like the 28-byte header on the
  150.          .MJB files, TPCONV.EXE extracts the header and
  151.          and data, leaving plain BGI data ("Putimage" forma